greatcfandomcom-20200214-history
User talk:Bernard Mensah
Hi, welcome to GREAT Computing Wiki! Thanks for your edit to the User:Bernard Mensah page. Please leave a message on my talk page if I can help with anything! -- JasonCozens (Talk) 07:41, September 7, 2009 Use of Category Namespace Bernard, I don't think you are using Categories correctly. A Category page should be made up of auto generated content with little added content see: Category:References, Category:Research, etc. I'm thinking of requesting a new namespace - "UserSpace" for additional user pages so that we can keepm them separate from main content. Pages would be of the Form: "UserSpace:JasonCozensThePassionateProgrammer", where this is a user space page belonging to Jason Cozens. JasonCozens 11:04, September 8, 2009 (UTC) Can you make sure you add your category "Bernard Mensah" to each page you create in UserSpace? Linking to Pages When linking to pages can you giove links more specific names rather than "page". For example: * My Software Development Page describes . . . * Not: The page describes . . . JasonCozens 09:36, November 26, 2009 (UTC) Areas for Discusssion * Programming Paradigms ** How many different paradigms are there? * Software Development Methodologies JasonCozens 16:01, November 2, 2009 (UTC) Write a regular expression to match nested brackets. ::= '(' ')' | | '' That is your regualr expressio should match nested brackets to any depth, for example: "((()))()((()()))". Comparative Programming On this wiki I've started an Introduction to Programming that tries to look at the bigger picture. Rather than start with hello world and then write one program after another I've started by asking how we can start testing hello world and automating the tests. So far I've started doing this in the bash shell, C# and Python. The intention is top start comparing the ins and outs of each language and also the possibility of using one implementation in one language as an observer of an implementation in another language. See what you think of the ideas so far. There is a "Talk" page behind each introductory page. JasonCozens 19:47, November 24, 2009 (UTC) Some Maths A set is a collection of distinct objects. * What is a set? * What is a relation? : A relation is an object that has its existence as within a definite context or setting. Context in this sense refers to a collection of elements which are chosen as the elements of the relation. Bernard Mensah 08:10, November 5, 2009 (UTC) I was looking for a short definition, something along the lines: * An n-ary relation is a set of n-tuples. An n-tuple is in the relation if it is in the set. JasonCozens 19:06, November 5, 2009 (UTC) * What is a function? : A function is a relation between a set of n-tuples (domain) and another set of n-tuples (codomain). It defines a one-to-one mapping between each element in the domain and the codomain Bernard Mensah 10:38, November 6, 2009 (UTC) This is quite close but the mapping does not have to be one-to-one. It can be many-to-one. A partial function is a subset of the cross product of two sets. The members of the first set that are in f are the domain of the function and the members of the second set that are in f are the range of the function. : \begin{array}{rcl} f & : & S_1 \times S_2 \\ dom(f) & = & \{ x : (x ,y) \in f \} \\ rng(f) & = & \{ y : (x ,y) \in f \} \end{array} If dom(f) = S_1 the function is a total function. In many cases in mathematics it is assumed dom(f) = S_1 and rng(f) = S_2 . What makes a function different to a general relation is the fact that if f(x) maps to y and f(x) maps to z then y and z are the same. : (x,y) \in f \land (x,z) \in F \implies y = z Naive Set Theory "Naive Set Theory" has two axioms. * Firstly: what is an axiom? * Secondly: what are the two axioms of Naive Set Theory * Thirdly: What problem arises from these two axioms? JasonCozens 19:40, November 24, 2009 (UTC) Kornshell Script Bernard, I've made some changes to your script. They aren't quite correct yet. But I'm not sure of the exact logic you are using. There are some more changes that could be made. What do you think? JasonCozens 14:05, January 25, 2010 (UTC) ##################################################### #Author : Bernard Mensah #Date : 21/01/10 #Purpose: This script reads in user input to #determine whether a group and user exists. #It also provides the option to create them if #they dont. ##################################################### #All variables declared here USERTEXT="USER" GROUPTEXT="GROUP" #All functions defined here function CREATEUSER(){ useradd -d /export/home/$1 -m -s /bin/ksh -c "$1" if $? -eq 0 then echo "Successfully created user" else echo "Creation failed,are you root?" fi } function CREATEGROUP(){ groupadd $1 if $? -eq 0 then echo "Successfully created group" else echo "Creation failed,are you root?" fi } function CHECKFORGROUP(){ /bin/egrep -i $1 /etc/group if $? -eq 0 then echo "Group $1 exists in /etc/group" return 0 else echo "Group $1 does not exist /etc/group" return 1 fi } function CHECKFORUSER(){ /bin/egrep -i $1 /etc/passwd if $? -eq 0 then echo "User $USERID exists in /etc/passwd" return 0 else echo "User $USERID does not exist in /etc/passwd" return 1 fi } function QUESTIONPROMPT(){ PROMPT="Create $1 $2? y/n " echo $PROMPT while read -r RESPONSE do case $RESPONSE in "y") return 0; break;; "n") return 1; break;; *) esac echo $PROMPT done } # # Check USERID # echo "Enter user id to search for" read USERID CHECKFORUSER $USERID # # Create user if required. # if $? -eq 1 then QUESTIONPROMPT $USERTEXT "$USERID" if $? -eq 0 then CREATEUSER "$USERID" fi fi # # Check group id. # echo "Enter group id to search for" read GROUPID CHECKFORGROUP "$GROUPID" # # Create group if required. # if $? -eq 1 then QUESTIONPROMPT $GROUPTEXT "$GROUPID" if $? -eq 0 then CREATEGROUP fi fi echo "End of script" Page Titles Bernard, It's good to see you adding more content. Can you make the titles of your pages are consistent? They all should start UserSpace:BM- That is with no spaces around the hyphen. You have some with various different spaces around the hyphen. Cheers, JasonCozens 08:19, April 19, 2010 (UTC)